/*-------------------------
Spending Money
-------------------------*/
local meta = FindMetaTable("Player")
 
function meta:AddMoney(amount)
	local current_cash = self:GetMoney()
	self:SetMoney( current_cash + amount )
	GAMEMODE:CashPoints(self:Team(), amount)
end
 
function meta:SetMoney(amount)
	self:SetNetworkedInt( "Money", amount )
end
 
function meta:TakeMoney(amount)
   self:AddMoney(-amount)
end
 
function meta:GetMoney()
	return self:GetNetworkedInt( "Money" )
end

/*-------------------------
Loot Money
-------------------------*/

local meta = FindMetaTable("Player")
 
function meta:AddLoot(amount)
	local current_cash = self:GetLoot()
	self:SetLoot( current_cash + amount )
end
 
function meta:SetLoot(amount)
	self:SetNetworkedInt( "Loot", amount )
end
 
function meta:TakeLoot(amount)
   self:AddMoney(-amount)
end
 
function meta:GetLoot()
	return self:GetNetworkedInt( "Loot" )
end